cs-apolo-sapi-v2
π API Documentation - cs-apolo-sapi-v2
This section describes the attributes and usage of the cs-apolo-sapi-v2 service.
ποΈ Base Information
- API Title: cs-apolo-sapi-v2
- Version: 1.0.0
- Base URL:
https://cs-apolo-sapi-v2-{env}.us-e1.cloudhub.io/api/
Replace the environment segment with: dev
(Development)qa
(Quality Assurance)
π Authentication
Required Headers
Header | Type | Description |
---|---|---|
client_id | String | Unique identifier for API clients |
invoker | String | JSON with caller information |
- client_id
- Length: 32 - 36 characters
- Example:
123e4567-e89b-12d3-a456-426614174000
- invoker
- Example:
{ "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }
- Example:
> π These headers are required in all requests.
π Endpoint: Create Independent Worker
POST /create-independent-worker
- Description: Creates a new independent worker in the system.
Complete URL
https://cs-apolo-sapi-v2-dev.us-e1.cloudhub.io/api/create-independent-worker
HTTP Method
POST
Required Headers
client_id: YOUR_CLIENT_ID
invoker: { "application": "Portal","addressIPUser": "192.168.80.13","loginUser": "User","userName": "User Name" }
Content-Type: application/json
Authentication
Client ID enforcement and oauth2
Request Body
{
"worker": {
"firstName": "Carlos",
"lastName": "RamΓrez",
"identificationType": "CC",
"identificationNumber": "1098765432",
"birthDate": "1990-03-22",
"gender": "M",
"email": "carlos.ramirez@example.com",
"phone": "3157894561",
"address": "Carrera 45 # 67-89",
"cityCode": "11001"
},
"contract": {
"consecutiveContract": "59",
"entryDate": "2025-02-01",
"riskLevel": "3",
"averageDailyWage": "120000",
"workingDays": "L-V",
"economicActivity": "6201",
"epsCode": "EPS002",
"afpCode": "AFP003"
}
}
Example Request
curl -X POST "https://cs-apolo-sapi-v2-dev.us-e1.cloudhub.io/api/create-independent-worker" \
-H "client_id: YOUR_CLIENT_ID" \
-H "invoker: { \"application\": \"Portal\",\"addressIPUser\": \"192.168.80.13\",\"loginUser\": \"User\",\"userName\": \"User Name\" }" \
-H "Content-Type: application/json" \
-d '{
"worker": {
"firstName": "Carlos",
"lastName": "RamΓrez",
"identificationType": "CC",
"identificationNumber": "1098765432",
"birthDate": "1990-03-22",
"gender": "M",
"email": "carlos.ramirez@example.com",
"phone": "3157894561",
"address": "Carrera 45 # 67-89",
"cityCode": "11001"
},
"contract": {
"consecutiveContract": "59",
"entryDate": "2025-02-01",
"riskLevel": "3",
"averageDailyWage": "120000",
"workingDays": "L-V",
"economicActivity": "6201",
"epsCode": "EPS002",
"afpCode": "AFP003"
}
}'
Example Response
{
"status": "SUCCESS",
"code": "200",
"message": "Independent worker created successfully",
"data": {
"workerConsecutive": "8765432",
"identificationNumber": "1098765432",
"identificationType": "CC",
"contractConsecutive": "59",
"affiliationDate": "2025-02-01T00:00:00Z"
}
}
β οΈ Error Codes
Code | Description | Suggested Solution |
---|---|---|
400 | Bad Request | Check request syntax and parameters. |
401 | Unauthorized | Validate authentication credentials. |
404 | Not Found | Confirm the endpoint URL. |
500 | Internal Server Error | Retry or contact technical support. |
π Support
For assistance, contact the Integration Services and Applications Coordination team.